package com.thinkgem.jeesite.modules.customer.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.thinkgem.jeesite.modules.building.entity.Building;
import com.thinkgem.jeesite.modules.building.entity.Room;
import com.thinkgem.jeesite.modules.building.service.BuildingService;
import com.thinkgem.jeesite.modules.customer.dao.OwnerDao;
import com.thinkgem.jeesite.modules.sys.entity.User;

@Service
@Transactional(readOnly=true)
public class OwnerService extends CrudService<OwnerDao, Room>{
	@Autowired
	OwnerDao ownerDao;
	@Autowired
	BuildingService buildingService;
	
	/**
	 * 插入一个新的房间
	 * */
	@Transactional(readOnly=false)
	public void insertNewRoom(Room room){
		ownerDao.insertNewRoom(room);
	}
	public int findRoomCountByRoomNum(User user){
		return ownerDao.findRoomCountByRoomNum(user);
	}
	
}
